// jsx   js + xml

import { createBrowserRouter } from "react-router-dom";

import Layout from "../layout";
import Hospital from "../pages/hospital";
import Doctor from "../pages/doctor";
import EditHospital from '../pages/hospital/edit'
import Record from '../pages/record'
import Policy from '../pages/policy'

import { useNavigate,useNavigation } from "react-router-dom";


console.log(navigation)
// 路由器对象
const router = createBrowserRouter([
    {
        path:"",
        element:<Layout/>,
        children:[
            {
                index:true, //设置默认路由
                element:<Hospital/>
            },
            {
                path:"/doctor",
                element:<Doctor/>
            },
            {
                path:'/edit-hospital',
                element: <EditHospital/>
            },
            {
                path:'/policy',
                element: <Policy/>
            },
            {
                path:'/record',
                element: <Record/>
            }

        ]
    }
  ]);
  

export default router;